package request

import "time"

type SlaType = int

const (
	SlaStat   = 1
	CountStat = 2
)

type SlaQuery struct {
	AppName     string   `form:"app_name" json:"app_name,omitempty"`
	Level       int      `form:"level" json:"level,omitempty"`
	GroupID     string   `json:"group_id,omitempty" form:"group_id"`
	GroupIDS    []string `json:"group_ids,omitempty" form:"group_ids"`
	UID         string   `json:"uid,omitempty" form:"uid"`
	Start       string   `form:"start" json:"start,omitempty"`
	End         string   `form:"end" json:"end,omitempty"`
	Order       int      `form:"order" json:"order,omitempty"` //0:升序 1：降序
	Sort        string   `form:"sort" json:"sort,omitempty"`
	Type        SlaType  `form:"type" json:"type,omitempty"` //1时间2次数
	TemplateIDS string   `form:"template_ids" json:"template_ids"`
	StartDate   string
	EndDate     string
	PageNum     int `form:"page_num" json:"page_num,omitempty"`
	PageSize    int `form:"page_size" json:"page_size,omitempty"`
}

type OverviewReq struct {
	GroupID   string `form:"group_id" json:"group_id,omitempty"`
	Level     int    `form:"level" json:"level,omitempty"`
	Start     string `form:"start" json:"start,omitempty"`
	End       string `form:"end" json:"end,omitempty"`
	StartDate time.Time
	EndDate   time.Time
	GroupIDS  []string
}

type AppSlaReq struct {
	IDS         string   `json:"ids,omitempty" form:"ids"`
	AppIDS      []uint64 `json:"app_ids,omitempty" form:"app_ids"`
	Start       string   `form:"start" json:"start,omitempty"`
	End         string   `form:"end" json:"end,omitempty"`
	Type        SlaType  `form:"type" json:"type,omitempty"`
	TemplateIDS string   `form:"template_ids" json:"template_ids"`
}
